home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / Libraries / Scrolling Panel / CodeWarrior⁄PPC Version / TestSDLNative.c < prev    next >
C/C++ Source or Header  |  1994-07-13  |  1KB  |  65 lines

  1. /*************************************************************************************************
  2. *
  3. *
  4. *            TestScrollDialogNative.c
  5. *
  6. *            -a skanky Native App for testing PowerPC version of ScrollDialogLib
  7. *
  8. *            13/7/94
  9. *
  10. *
  11. *************************************************************************************************/
  12.  
  13. #include    "ScrollDialog.h"
  14.  
  15.  
  16. #define        kAlertBoxID            128
  17. #define        kTextUserItemID        2
  18. #define        kTextResourceID        128
  19. #define        kCanBeEdited        TRUE
  20.  
  21. void main(void)
  22. {
  23.     short        aHit;
  24.     DialogPtr    sdw;
  25.     
  26.     InitGraf(&qd.thePort);                                    /* mac toolbox init stuff */
  27.     InitFonts();
  28.     InitWindows();
  29.     InitMenus();
  30.     TEInit();
  31.     InitDialogs(NIL);
  32.     
  33.     SetWatchCursor();
  34.     FlushEvents(everyEvent,0);
  35.     
  36.     MaxApplZone();
  37.     MoreMasters();
  38.     
  39.     InitCursor();
  40.  
  41.     sdw = GetTextDialog(kAlertBoxID,kTextUserItemID,kTextResourceID,kCanBeEdited);
  42.     
  43.     if (sdw)
  44.     {
  45.         ShowWindow(sdw);
  46.         SelectWindow(sdw);
  47.         
  48.         aHit = 0;
  49.         
  50.         while(aHit == 0)
  51.             ModalTDDialog(&aHit);
  52.             
  53.         DisposeTDDialog(sdw);
  54.     
  55.     }
  56. }
  57.  
  58.  
  59. int    SetWatchCursor(void)
  60. {
  61.     CursHandle    watch;
  62.     
  63.     watch = GetCursor(watchCursor);
  64.     SetCursor(*watch);
  65. }